|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.PricePlanModel
public class PricePlanModel
This class represents a price plan.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="pricePlan">
<xs:complexType>
<xs:sequence>
<xs:element ref="counterDescription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="usage" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="oneShot" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="recurring" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="chargingPlan" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="freeText" type="xs:string"/>
<xs:attribute name="currency" type="xs:string" use="optional"/> <!-- deprecated -->
</xs:complexType>
</xs:element>
| Constructor Summary | |
|---|---|
PricePlanModel()
Builds an empty PricePlanModel. |
|
PricePlanModel(java.lang.String name,
java.lang.String description,
java.lang.String text,
java.lang.String currencyCode)
Builds a PricePlanModel. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String name,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
void |
addOneShotRate(OneShotRateModel rate)
Adds a one shot rate. |
void |
addOneShotRates(java.util.Vector<OneShotRateModel> oneShotRates)
Adds one shot rates. |
void |
addRecurringRate(RecurringRateModel rate)
Adds a recurring rate. |
void |
addRecurringRates(java.util.Vector<RecurringRateModel> recurringRates)
Adds recurring rates. |
void |
addUsageRate(UsageRateModel rate)
Adds an usage rate. |
void |
addUsageRates(java.util.Vector<UsageRateModel> usageRates)
Adds usage rates. |
void |
checkChargingPlanCompatibility()
Check if the charging plan is compatible with this price plan. |
boolean |
checkValidity()
Returns true if the price plan is valid. |
java.util.Vector<CounterDescriptionModel> |
createCounterDescriptions()
Creates the counter descriptions including persistent and transient counters. |
static void |
findLeaves(RateComponentModel component,
java.util.List<RateComponentModel> leaves)
Fill the given list with all leaves starting from the given rate component. |
ChargingPlanModel |
getChargingPlan()
Gets the charging plan. |
ChargingPlanDictionaryModel |
getChargingPlanDictionaryModel()
|
RatingContextDescription |
getContext(ContextualNode child)
Updates the context for the specified child and returns it. |
java.lang.String |
getCurrencyCode()
Deprecated. Use ChargeComponentModel.getCurrencyCode(). |
java.lang.String |
getDescription()
Gets the description. |
java.lang.String |
getFreeText()
Gets the free text. |
java.lang.String |
getName()
Gets the name. |
OneShotRateModel |
getOneShotRate(int index)
Gets a one shot rate. |
java.util.Vector<OneShotRateModel> |
getOneShotRates()
Gets one shot rates. |
java.util.Vector<ParameterModel> |
getParameters()
Gets the parameters. |
java.util.Vector<CounterDescriptionModel> |
getPersistentCounterDescriptions()
Gets the persistent counter descriptions. |
java.util.Vector<ProductModel> |
getProducts()
Gets the products. |
RecurringRateModel |
getRecurringRate(int index)
Gets a recurring rate. |
java.util.Vector<RecurringRateModel> |
getRecurringRates()
Gets the recurring rates. |
java.util.Vector<CounterDescriptionModel> |
getTransientCounterDescriptions()
Gets the transient counter descriptions. |
UsageRateModel |
getUsageRate(int index)
Gets an usage rate at a specified index. |
java.util.Vector<UsageRateModel> |
getUsageRates()
Gets the usage rates. |
RatingContextDescription |
inheritedContext()
Gets the inherited context. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
removeOneShotRate(int index)
Removes a one shot rate. |
void |
removeRecurringRate(int index)
Removes a recurring rate. |
void |
removeUsageRate(int index)
Removes an usage rate. |
java.util.Vector<PropertyDescriptionModel> |
retrieveAllProperties()
Returns all the properties of this price plan. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setChargingPlan(ChargingPlanModel chargingPlan)
Sets the charging plan. |
void |
setChargingPlanDictionaryModel(ChargingPlanDictionaryModel chargingPlanDictionaryModel)
|
void |
setContext(RatingContextDescription contextDescription)
Sets the context. |
void |
setCurrencyCode(java.lang.String currencyCode)
Deprecated. Use ChargeComponentModel.setCurrencyCode(String). |
void |
setDescription(java.lang.String description)
Sets the description. |
void |
setFreeText(java.lang.String text)
Sets the free text. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setParameters(java.util.Vector<ParameterModel> p)
Sets the parameters. |
void |
setParent(ContextualNode node)
Sets the parent. |
void |
setPersistentCounterDescriptions(java.util.Vector<CounterDescriptionModel> counterDescriptions)
Sets the persistent counter descriptions. |
void |
setProducts(java.util.Vector<ProductModel> products)
Sets the products. |
void |
setTransientCounterDescriptions(java.util.Vector<CounterDescriptionModel> counterDescriptions)
Sets the transient counter descriptions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PricePlanModel()
public PricePlanModel(java.lang.String name,
java.lang.String description,
java.lang.String text,
java.lang.String currencyCode)
name - the name.description - the description.text - the free text.currencyCode - the currency code.| Method Detail |
|---|
public void setName(java.lang.String name)
name - the name.public java.lang.String getName()
public void setDescription(java.lang.String description)
description - the description.public java.lang.String getDescription()
public void setFreeText(java.lang.String text)
text - the free text.public java.lang.String getFreeText()
@Deprecated public void setCurrencyCode(java.lang.String currencyCode)
ChargeComponentModel.setCurrencyCode(String).
currencyCode - the currency code.@Deprecated public java.lang.String getCurrencyCode()
ChargeComponentModel.getCurrencyCode().
public void setProducts(java.util.Vector<ProductModel> products)
products - a Vector of ProductModel.public java.util.Vector<ProductModel> getProducts()
ProductModel.public java.util.Vector<CounterDescriptionModel> createCounterDescriptions()
CounterDescriptionModel.public void setPersistentCounterDescriptions(java.util.Vector<CounterDescriptionModel> counterDescriptions)
counterDescriptions - a Vector of CounterDescriptionModel.public java.util.Vector<CounterDescriptionModel> getPersistentCounterDescriptions()
CounterDescriptionModel.public void setTransientCounterDescriptions(java.util.Vector<CounterDescriptionModel> counterDescriptions)
counterDescriptions - a Vector of CounterDescriptionModel.public java.util.Vector<CounterDescriptionModel> getTransientCounterDescriptions()
CounterDescriptionModel.public java.util.Vector<UsageRateModel> getUsageRates()
UsageRateModel.public void addUsageRates(java.util.Vector<UsageRateModel> usageRates)
usageRates - a Vector of UsageRateModel.public void addUsageRate(UsageRateModel rate)
rate - the usage rate to add.public void removeUsageRate(int index)
index - the index of the usage rate to be removed.public UsageRateModel getUsageRate(int index)
index - the index of the usage rate to get.
public java.util.Vector<RecurringRateModel> getRecurringRates()
RecurringRateModel.public void addRecurringRates(java.util.Vector<RecurringRateModel> recurringRates)
recurringRates - a Vector of RecurringRateModel.public void addRecurringRate(RecurringRateModel rate)
rate - the recurring rate to add.public void removeRecurringRate(int index)
index - the index of the recurring rate to be removed.public RecurringRateModel getRecurringRate(int index)
index - the index of the recurring rate to get.
public java.util.Vector<OneShotRateModel> getOneShotRates()
OneShotRateModel.public void addOneShotRates(java.util.Vector<OneShotRateModel> oneShotRates)
oneShotRates - a Vector of OneShotRateModel.public void addOneShotRate(OneShotRateModel rate)
rate - the one shot rate to add.public void removeOneShotRate(int index)
index - the index of the one shot rate to be removed.public ChargingPlanModel getChargingPlan()
charging plan.public void setChargingPlan(ChargingPlanModel chargingPlan)
charging plan.
chargingPlan -
public void checkChargingPlanCompatibility()
throws InvalidInitializationException
InvalidInitializationExceptionpublic void setChargingPlanDictionaryModel(ChargingPlanDictionaryModel chargingPlanDictionaryModel)
public ChargingPlanDictionaryModel getChargingPlanDictionaryModel()
public OneShotRateModel getOneShotRate(int index)
index - the index of the one shot rate to get.
public java.util.Vector<ParameterModel> getParameters()
ParameterModel.public void setParameters(java.util.Vector<ParameterModel> p)
p - a Vector of ParameterModel.public void setParent(ContextualNode node)
setParent in interface ContextualNodenode - the parent (ignored).public RatingContextDescription getContext(ContextualNode child)
getContext in interface ContextualNodechild -
public RatingContextDescription inheritedContext()
inheritedContext in interface ContextualNodepublic void setContext(RatingContextDescription contextDescription)
contextDescription - the context.public boolean checkValidity()
public java.util.Vector<PropertyDescriptionModel> retrieveAllProperties()
PropertyDescriptionModel that represents all
the properties defined in this price plan.public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be added
public void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
public static final void findLeaves(RateComponentModel component,
java.util.List<RateComponentModel> leaves)
component - the rate component of the start.leaves - the list of all leaves retreived.
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||